package 网易机试;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class 网易题目操作排序1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = sc.nextLong();
            }
            solve(a);
        }
        sc.close();
    }

    private static ArrayList<Integer> changeIdx(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = i;
        }
        ArrayList<Integer> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            list.add(a[i]);
            Collections.reverse(list);
        }
        System.out.println(list);
        return list;
    }

    private static void solve(long[] a) {
        ArrayList<Integer> idx = changeIdx(a.length);
        for (int i = 0; i < a.length - 1; i++) {
            System.out.print(a[idx.get(i)]);
            System.out.print(" ");
        }
        System.out.println(a[idx.get(a.length - 1)]);
    }


}
